// Code generated by MockGen. DO NOT EDIT.
// Source: piece_downloader.go
//
// Generated by this command:
//
//	mockgen -destination piece_downloader_mock.go -source piece_downloader.go -package peer
//
// Package peer is a generated GoMock package.
package peer

import (
	context "context"
	io "io"
	reflect "reflect"

	gomock "go.uber.org/mock/gomock"
)

// MockPieceDownloader is a mock of PieceDownloader interface.
type MockPieceDownloader struct {
	ctrl     *gomock.Controller
	recorder *MockPieceDownloaderMockRecorder
}

// MockPieceDownloaderMockRecorder is the mock recorder for MockPieceDownloader.
type MockPieceDownloaderMockRecorder struct {
	mock *MockPieceDownloader
}

// NewMockPieceDownloader creates a new mock instance.
func NewMockPieceDownloader(ctrl *gomock.Controller) *MockPieceDownloader {
	mock := &MockPieceDownloader{ctrl: ctrl}
	mock.recorder = &MockPieceDownloaderMockRecorder{mock}
	return mock
}

// EXPECT returns an object that allows the caller to indicate expected use.
func (m *MockPieceDownloader) EXPECT() *MockPieceDownloaderMockRecorder {
	return m.recorder
}

// DownloadPiece mocks base method.
func (m *MockPieceDownloader) DownloadPiece(arg0 context.Context, arg1 *DownloadPieceRequest) (io.Reader, io.Closer, error) {
	m.ctrl.T.Helper()
	ret := m.ctrl.Call(m, "DownloadPiece", arg0, arg1)
	ret0, _ := ret[0].(io.Reader)
	ret1, _ := ret[1].(io.Closer)
	ret2, _ := ret[2].(error)
	return ret0, ret1, ret2
}

// DownloadPiece indicates an expected call of DownloadPiece.
func (mr *MockPieceDownloaderMockRecorder) DownloadPiece(arg0, arg1 any) *gomock.Call {
	mr.mock.ctrl.T.Helper()
	return mr.mock.ctrl.RecordCallWithMethodType(mr.mock, "DownloadPiece", reflect.TypeOf((*MockPieceDownloader)(nil).DownloadPiece), arg0, arg1)
}
